#include "motorControl.h"
#include "uart.h"
#include "checksum.h"

void setMotorSpeed(uint8_t left, uint8_t right)
{
	uint8_t data[6] = {HEADER_DATA_BYTE, 0x1e, 0xa2, left, right, 0x00};
    data[5] = constructChecksum(data, 5);

   	sendUART(data, 6);
	
	//vtI2CEnQ(myDevPtr,vtI2CMsgTypeMotorCommand,0x17,sizeof(data),data,0);
}

void reqSensorData()
{
	// Send a write to tell the sensor PIC what to return
    {
    	uint8_t data[6] = {HEADER_DATA_BYTE, 0x4E, 0xB1, 0x00, HEADER_DATA_BYTE, 0x4F};
		data[3] = constructChecksum(data, 3);
		sendUART(data, 6);
    }
}